﻿<phone:PhoneApplicationPage 
    x:Class="EbbinghausWord.Pages.ScorePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <controls:Panorama>
            <controls:Panorama.TitleTemplate>
                <DataTemplate>
                </DataTemplate>
            </controls:Panorama.TitleTemplate>

            <!--当前成绩-->
            <controls:PanoramaItem Header="成绩">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="150"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>

                    <StackPanel>
                        <TextBlock Text="您的成绩预测为" Style="{StaticResource largeText}"/>
                        <TextBlock Text="满分150，该成绩仅代表您的单词学习情况" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    </StackPanel>
                    <TextBlock Grid.RowSpan="2" x:Name="socreTextBlock"
                               VerticalAlignment="Center"
                                   TextAlignment="Center" FontSize="100"
                                   Text="710.000"/>
                </Grid>
            </controls:PanoramaItem>

            <!--历史成绩-->
            <controls:PanoramaItem Header="历史成绩">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="45"/>
                        <RowDefinition Height="45"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    
                    <Grid Height="30" Grid.Row="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="250"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="日期" Style="{StaticResource middleText}"/>
                        <TextBlock Grid.Column="1" Text="成绩" Style="{StaticResource middleText}"/>
                    </Grid>
                    
                    <ListBox x:Name="scoreListBox" Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <ListBox.ItemContainerStyle>
                            <Style TargetType="ListBoxItem">
                                <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                            </Style>
                        </ListBox.ItemContainerStyle>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition/>
                                        <ColumnDefinition Width="250"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding Path=Date}" Style="{StaticResource middleText}"/>
                                    <TextBlock Grid.Column="1" Text="{Binding Path=Score}" Style="{StaticResource middleText}"/>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>

            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

    <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>